 /**/
$(function(){  
    $("#docIframe").load(function(){   
        var height = $(this).contents().height(); 
//这样给以一个最小高度  
        $(this).height(height);  
    });  
      
}); 

window.onload = function() {
    doc.init();
}
var doc = {
    init:function(){
      common.navInit(1);
        
        //绑定语言切换
      common.switchLanInit(); 
      var pro = parseInt(common.getURLParam('product'),10);
      var page = window.location.href.match(/page=.*/) ;
      if(page){
         page = page[0].split('=')[1];
      }else{
         page = '' ;
      }
      switch(pro){
          case 2:
           $('#docIframe').attr("src",DOC_UNION_URL+page);
           $('.versionBlockLi').removeClass('versionCur');
           $('.versionBlockLi').eq(pro-1).addClass('versionCur');
           break;
          case 3:
           $('#docIframe').attr("src",DOC_BRIDGE_URL+page);
           $('.versionBlockLi').removeClass('versionCur');
           $('.versionBlockLi').eq(pro-1).addClass('versionCur');
           break;
          case 4:
           $('#docIframe').attr("src",DOC_TONGJI_URL+page);
           $('.versionBlockLi').removeClass('versionCur');
           $('.versionBlockLi').eq(pro-1).addClass('versionCur');
          break;
          default:
           $('#docIframe').attr("src",DOC_SPEAD_URL+page);
           $('.versionBlockLi').removeClass('versionCur');
           $('.versionBlockLi').eq(0).addClass('versionCur');
           break;
         
      }
    
    }
}